<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>配送规则</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#content").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					$("#content").val(editor1.html());
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/ivm/merchant/clause/form">配送规则</a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="merchantClause" action="${ctx}/ivm/merchant/clause/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<form:hidden path="merchant.id"/>
		<tags:message content="${message}"/>
		<div class="control-group display-none">
			<label class="control-label">客服乐活号:</label>
			<div class="controls">
				<form:input path="lhNo" htmlEscape="false" maxlength="100" class="required"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><span class="color-red font-size20">*</span>客服电话:</label>
			<div class="controls">
				<form:input path="phone" htmlEscape="false" maxlength="100" class="required"/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label"><span class="color-red font-size20">*</span>配送规则:</label>
			<div class="controls">
				<form:textarea path="content" htmlEscape="false" rows="6" style="width:678px;height:420px" class="input-xxlarge required"/>
			</div>
		</div>
		<div class="form-actions">
			<shiro:hasPermission name="ivm:merchant:clause:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
		</div>
	</form:form>
</body>
</html>
